package com.es.designmode.simplefactory;

/**
 * @author Will
 */
public class OperationDiv extends Operation {

    @Override
    public double getResult() throws Exception {

        if (getB() == 0) {
            throw new Exception("除数不能为0");
        }

        return getA() / getB();
    }
}
